package custom;


import java.sql.*;



public class QuizDBC {
	static String account = "root"; // replace with your account
	static String password = ""; // replace with your password
	static String server = "localhost";
	static String database = "mysql"; // replace with your db
	static Connection con;
	
	
	private static QuizDBC dbc = null;
	
	private QuizDBC(){
		
	}
	
	public static QuizDBC getInstance(){
		if(dbc == null){
			dbc = new QuizDBC();
		}
		return dbc;
	}
	
	//unda daabrunos orive varianti
	public ResultSet selectFromFriendsTable(int id1, int id2){
		return null;
	}
	
	// 0-id, 1 - tarigi, 2 - ramdenma gaaketa
	public ResultSet selectFromQuizTable(int qzId, String name, int ownerId, int sortBy, int number){
		return null;
	}
	
	//avtomaturad asortirebs drois mixedvit... da orivestvis unda amoigot...
	public ResultSet selectFromMessages(int from, int to, String msg, int seen){
		return null;
	}
	
	public ResultSet selectUser(int id, String name, String passworHash){
		return null;
	}
	
	public ResultSet selectRequests(int fromId, int toId){
		return null;
	}
	
	
	public ResultSet selectActivities1(int userId){
		return null;
	}
	
	public ResultSet selectActivities2(int userId){
		return null;
	}
	
	public ResultSet selectActivities3(int userId){
		return null;
	}
	
	// dasortirebuli dateis mixedvit pirveli n cali. tu -1 gadmomeca vabruneb yvelas.
	public ResultSet selectAnnouncements(int n){
		
		
		return null;
	}
	/**
	 * if checker == 0, top n cali scorebis mixedvit, 
	 * if checker == 1, date is mixedvit top n cals, 
	 * if check 
	 * @param userid
	 * @param n
	 * @return
	 */
	public ResultSet selectFromQuizescores(int userid, int quizid, int n, int checker ){
		
		return null;
	}
	
	
	// id_is mixedvit vshli.
	public void removeFromAnnouncments(int id){
		
		
	}
	
	/**
	 * chaagdos bazashi da daabrunos id, rasac mianichebs....
	 * @param name
	 * @param password
	 * @return
	 */
	
	
	public int insertUser(String name, String password){
		return 0;
	}
	
	public void insertQuizScores(int quizId, int userId, int score){
		
	}
	
	public void updateUser(int userId, boolean changeAdminStatus, int increaseScore){
		
	}
	/**
	 *  bazashi chavagdot mocemuli textis announcmenti.
	 */
	public int insertAnnouncment(String text){
		
		return 0;
	}
	
	/**
	 * massage cxrilshi chamateba;
	 * @param senderid
	 * @param receiverid
	 * @param text
	 */
	public void insertMassage(int senderid, int receiverid, String text, int seen){
		
	}
/**
 * current dateze vamateb am monacemebs bazashi.
 * @param quizeid
 * @param userid
 * @param scores
 */
		
	
	public void insertIntoQuizescores(int quizeid, int userid, int scores){
		
	}
	
	//aqedannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
	public void insertIntoRequests(int fromId, int toId){
		
	}
	
	public void removeFromRequests(int fromId, int toId){
		
	}
	
	public void insertIntoFriends(int first, int second){
		
	}
	
	public int insertIntoQuiz(String name, int authorId, String desc, int isOnePage, int randSequence){
		return 0;
	}
	
	public void updateMessageAsSeen(int id){
		
	}

	public void insertIntoActivity1(int quizId, int userId, int score) {
		// TODO Auto-generated method stub
		
	}
	
	
}
